package com.liang.cloud.Emun;

import lombok.Getter;

@Getter
public enum ResultEnum {
    PARAM_ERROR(-1,"参数错误"),
    PRODUCT_NOT_EXIST(200,"该商品不存在"),
    PRODUCT_STOCK_ERROR(201,"库存数量加减错误"),
    PRODUCT_STOCK_NOT_ENOUGHT(202,"库存有错误"),
    PRODUCT_STATUS_ERROR(203,"产品状态异常"),

    ORDER_NOT_EXIST(11,"订单不存在"),
    ORDERDETAIL_NOT_EXIST(12,"订单详情不存在"),
    ORDER_STATUS_ERROE(13,"订单状态错误"),
    ORDER_DETAIL_EMPTY(14,"订单详情空"),
    ORDER_ONWER_ERROR(15,"订单主人错误"),
    ORDER_HAS_FINISHED(16,"订单已经支付"),
    ORDER_CANCEL_SUCCESS(17,"订单取消成功"),
    ORDER_FINISHED_SUCCESS(18,"订单完成成功"),

    CART_EMPTY(21,"购物车为空"),


    CANCLE_ORDER_ERROR(71,"取消订单错误"),
    FINISHED_ORDER_ERROR(72,"完成订单错误"),


    WECHAT_MP_ERROR(100,"微信公众号错误"),
    WXPAY_NOTIFY_MONEY_VERIFY_ERROR(101,"微信异步金额错误"),
    WECHAT_MA_ERROR(102,"微信小程序获取openid错误"),
    WECHAT_MA_PAY_ERROR(103,"微信小程序支付错误"),

    CATEGORY_TYPE_ERROR(111,"存在相同类目type了"),
    CATEGORY_SAVE_SUCCESS(110,"类目修改插入成功"),



    LOGIN_FAIL(900,"登录失败"),
    LOGOUT_SUCCESS(901,"登出成功"),


    CALL_TIME(999,"服务调用超时")
    ;
    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
